<template>
	<view class="page">
		<top-navigation :bgColor="'#FFFFFF'">
			<template #center-slot>
				联系平台
			</template>
		</top-navigation>
		<textarea placeholder="请留下您的宝贵意见或建议，我们将努力改进（反馈内容不少于10个字）" maxlength="500" placeholder-style="font-size: 24rpx;color: #999999;" class="advice" v-model="question" />
		<textarea placeholder="请留下您的手机号，以便我们回复您" maxlength="11" placeholder-style="font-size: 28rpx;color: #999999;" class="phone" v-model="phone" />
		<view class="func-button" @tap="contactPlatform">
			提交
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				question: '',// 反馈意见
				phone: '' // 联系方式
			};
		},
		methods: {
			//联系平台
			contactPlatform() {
				if (this.$check.checkNull(this.question, '反馈内容', true)) return;
				if (this.question.length < 10) {
					this.$toast('反馈内容不少于十个字')
					return;
				}
				if (this.$check.checkPhoneNumber(this.phone, '手机号', true)) return;
				
			}
		}
	}
</script>

<style lang="scss" scoped>
	page {
		background: $uni-bg-color-grey;
	}
	.advice {
		width: 750rpx;
		height: 238rpx;
		background-color: #FFFFFF;
		padding: 28rpx 32rpx;
		box-sizing: border-box;
		margin-top: 1px;
	}
	.phone {
		width: 750rpx;
		height: 112rpx;
		background-color: #FFFFFF;
		padding: 36rpx 32rpx;
		box-sizing: border-box;
		margin-top: 20rpx;
	}
	.func-button {
		position: fixed;
		bottom: 48rpx;
		left: 50%;
		transform: translateX(-50%);
		/*兼容 IOS<11.2*/
		padding-bottom: constant(safe-area-inset-bottom);
		/*兼容 IOS>11.2*/
		padding-bottom: env(safe-area-inset-bottom);
		width: 668rpx;
		height: 88rpx;
		line-height: 88rpx;
		text-align: center;
		font-size: 28rpx;
		font-weight: bold;
		background: #FFF;
		color: $uni-color-primary;
	}
</style>
